from gameset.phoenicia.base import *

from ..agriculture import Field, InediblePlant, SeaResource
from .pottery import Pottery


class Dye(ProcessedMaterial):
    singular =_ ('Dye')
    plural   =_ ('Dye')


class DyePlant(InediblePlant):
    singular =_ ('Dye Plant')
    plural   =_ ('Dye Plants')


class Snails(SeaResource, Material):
    singular   =_ ('Snail')
    plural     =_ ('Snails')
    likelyhood =_ (5)


class CommonDye(Dye):
    singular =_ ('Common Dye')
    plural   =_ ('Common Dye')
    quality  =_ (0.2)


class PurpleDye(Dye):
    singular =_ ('Purple Dye')
    plural   =_ ('Purple Dye')
    quality  =_ (0.75)


class DyePlantField(Field):
    name          =_ ('Dye Plant Field')
    color         =_ (Blue)
    plant         =_ (DyePlant)
    seed_month    =_ (6)
    harvest_month =_ (4)
    max_seeds     =_ (200)
    weed_chance   =_ (4)
    resistance    =_ (0.2)


class DyeMaker(Workshop):
    name     =_ ('Dye Maker')
    color    =_ (Purple)
    cost     =_ (250)
    size     =_ (2)
    staff    =_ (12)
    produces =_ (Production(input = (DyePlant(2), Pottery(1)), output = CommonDye(1),  duration = 0.25),
                 Production(input = (Snails(1), Pottery(10)),  output = PurpleDye(10), duration = 2.5))
